/* 
 * Cashbox is the legal property of its developers, whose names are listed in the copyright file included
 * with this source distribution.
 * 
 * This program is free software; you can redistribute it and/or modify it under the terms of the GNU
 * General Public License as published by the Free Software Foundation; either version 2 of the License,
 * or (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
 * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
 * Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License along with this program; if not,
 * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */

enum {
	CBDateAttribute			= 1,
	CBStringAttribute		= 2,
	CBCurrencyAttribute		= 3,
	CBLabelAttribute		= 4,
	CBIntegerAttribute		= 5,
	CBBooleanAttribute		= 6,
	CBMixedAttribute		= 7,
};
typedef NSUInteger CBAttributeType;

enum CBRoleType {
	CBNoRole,
	CBDateRole,
	CBDescriptionRole,
	CBCheckNumberRole,
	CBPositiveCashflowRole,
	CBNegativeCashflowRole
};
typedef NSUInteger CBRoleType;

enum {
	CBNoOptions = 0,
	CBReadonlyAttribute = 1,
	CBLongTextAttribute = 2
};
typedef NSUInteger CBAttributeOptions;

@interface CBAttribute : NSObject {
	NSString *name;
	NSString *localizedName;
	CBAttributeType type;
	CBAttributeOptions options;
	CBRoleType role;
	CBRoleType links;
	NSString *orderID;
}

+ (id)attributeWithName:(NSString *)name
		  localizedName:(NSString *)localizedName
				   type:(CBAttributeType)type
				options:(CBAttributeOptions)options
			   role:(CBRoleType)role
				  links:(CBRoleType)links
				orderID:(NSString *)orderID;

@property (retain) NSString *name;
@property (retain) NSString *localizedName;
@property CBAttributeType type;
@property CBAttributeOptions options;
@property CBRoleType role;
@property CBRoleType links;
@property (retain) NSString *orderID;

@end
